<template>
  <div>
    <div class="nb-content">
      <el-table ref="multipleTable" v-loading="loading" border :data="data.dataList" tooltip-effect="dark" class="nb-table" @selection-change="handleSelectionChange">
        <el-table-column label="序号" type="index" align="center" width="55" />
        <el-table-column type="selection" align="center" width="55" />
        <el-table-column prop="name" label="内容" align="center" show-overflow-tooltip width="180" />
        <el-table-column prop="period" label="周期" align="center" show-overflow-tooltip width="200" />
        <el-table-column prop="period_unit" label="周期单位" align="center" width="160" />
        <el-table-column prop="execute_time" label="日期" align="center" width="100" />
      </el-table>
    </div>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
      data: {
        dataList: []
      },
      loading: true,
      multipleSelection: []
    }
  },
  created() {
    this.index()
  },
  methods: {
    index() {
      this.loading = true
      axios.get('https://yan.hx-im.com.cn/api/v1/q1').then(res => {
        this.data.dataList = res.data.list
        console.log(this.data.dataList)
      }).finally(() => {
        this.loading = false
      })
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    }
  }
}
</script>

<style scoped>

</style>
